package com.example.padlock.data.api;

import com.example.padlock.data.entity.AdResultEntity;
import com.example.padlock.data.entity.AliveEntity;
import com.example.padlock.data.entity.CallResultEntity;
import com.example.padlock.data.task.AliveTask;
import com.example.padlock.data.task.CallTask;
import com.example.padlock.data.task.GetAdTask;

public class HttpApi {
	
	private OnFetched mOnFetched;
	
	public HttpApi(OnFetched mOnFetched){
		this.mOnFetched=mOnFetched;
	}
	
	public void getAd(String padCode){
		new GetAdTask(mOnFetched).execute(padCode);
	}
	
	public void postAliveState(String padCode){
		new AliveTask(mOnFetched).execute(padCode);
	}
	
	public void call(String padCode,String roomNum){
		new CallTask(mOnFetched).execute(padCode,roomNum);
	}
	
	public static class OnFetched{
		
		public void onAdFetched(AdResultEntity adResult){
			
		}
		
		public void onAlive(AliveEntity aliveResult){
			
		}
		
		public void onCall(CallResultEntity callResult){
			
		}

		public void onFail(String msg) {
			
		}
		
	}

}
